Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for inherent reactions in Mixer and Separator #1289

Merged
merged 5 commits into from
Nov 20, 2023

Conversation

andrewlee94
Copy link
Member

Fixes None

Summary/Motivation:

In developing a flowsheet for PrOMMiS, it was discovered that the Separator model had a degrees of freedom issue when separating streams including inherent reactions. Investigation revealed that the Separator material balances needed to include generation terms for the inherent reactions, and that this issue also exists in the Mixer.

Changes proposed in this PR:

  • Refactor Mixer and Separator material balances to eliminate unnecessary zero terms
  • Add necessary terms to Mixer and Separator material balances when inherent reactions are present
  • Add test cases for systems with inherent reactions for Mixer and Separator

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@andrewlee94 andrewlee94 requested a review from eslickj as a code owner November 16, 2023 21:24
@andrewlee94 andrewlee94 self-assigned this Nov 16, 2023
@andrewlee94 andrewlee94 added bug Something isn't working Priority:High High Priority Issue or PR unit models Issues dealing with the unit model libraries WaterTAP PrOMMiS Issues related to PrOMMiS activities labels Nov 16, 2023
Copy link
Contributor

@agarciadiego agarciadiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (ccf34ba) 77.41% compared to head (4d428e5) 77.41%.

Files Patch % Lines
idaes/models/unit_models/separator.py 75.00% 4 Missing and 4 partials ⚠️
idaes/models/unit_models/mixer.py 90.90% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1289      +/-   ##
==========================================
- Coverage   77.41%   77.41%   -0.01%     
==========================================
  Files         390      390              
  Lines       63388    63402      +14     
  Branches    11649    11658       +9     
==========================================
+ Hits        49071    49080       +9     
- Misses      11792    11796       +4     
- Partials     2525     2526       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MarcusHolly
Copy link
Contributor

Will test that this works with the UKy flowsheet after its merged in.

@andrewlee94 andrewlee94 enabled auto-merge (squash) November 20, 2023 14:38
@andrewlee94 andrewlee94 merged commit 446ff39 into IDAES:main Nov 20, 2023
36 checks passed
@andrewlee94 andrewlee94 deleted the mix_split_inherent_rxns branch November 20, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority:High High Priority Issue or PR PrOMMiS Issues related to PrOMMiS activities unit models Issues dealing with the unit model libraries WaterTAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants